﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.ComponentModel;
using System.Text.RegularExpressions;
using System.Configuration;

namespace CMS.Core.Libs
{
    public static class Ultility
    {
        public static string connectionString = ConfigurationManager.ConnectionStrings["cnnString4T"].ToString();

    }

    public static class Extensions
    {
        public static IEnumerable<T> DatareaderToList<T>(this IDataReader reader,
                                               Func<IDataReader, T> projection)
        {
            while (reader.Read())
            {
                yield return projection(reader);
            }
        }


    }
}
